package com.catsic.mod.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.catsic.base.BaseDao;
import com.catsic.mod.entity.Wservice;
import com.catsic.pub.entity.Drawer;

/**
 * @author yangyd
 * webservice dao类
 */
public interface WserviceDao extends BaseDao<Wservice, String> {
	
	/**
	 * findByDrawerCode:根据接口类型查询
	 * @author yangyd
	 * @param id
	 * @return List
	 */
	public List<Wservice> findByDrawerId(String id);
	
	@Query("select distinct d from Wservice w,Drawer d where w.organ.id = :organId and w.drawer.id!=d.id and d.parent.id=:drawerId") 
	public List<Drawer> findByDrawerNotWservice(@Param("organId") String organId,@Param("drawerId") String drawerId);
}
